package com.sunreal.paygateway.dao.model;

import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import lombok.ToString;

/**
 * Table: t_pay_order
 */
@Data
public class PayOrder implements Serializable {
    /**
     * 支付订单号
     *
     * Table:     t_pay_order
     * Column:    PayOrderId
     * Nullable:  false
     */
    private String payorderid;

    /**
     * 商户ID
     *
     * Table:     t_pay_order
     * Column:    MchId
     * Nullable:  false
     */
    private String mchid;

    /**
     * 商户订单号
     *
     * Table:     t_pay_order
     * Column:    MchOrderNo
     * Nullable:  false
     */
    private String mchorderno;

    /**
     * 渠道ID
     *
     * Table:     t_pay_order
     * Column:    ChannelId
     * Nullable:  false
     */
    private String channelid;

    /**
     * 渠道名称--WX或者ALIPAY
     */
    private String channelname;

    /**
     * 支付金额,单位分
     *
     * Table:     t_pay_order
     * Column:    Amount
     * Nullable:  false
     */
    private Long amount;

    /**
     * 三位货币代码,人民币:cny
     *
     * Table:     t_pay_order
     * Column:    Currency
     * Nullable:  false
     */
    private String currency;

    /**
     * 支付状态,0-订单生成,1-支付中(目前未使用),2-支付成功,3-业务处理完成,4-退款中，5-退款完成
     *
     * Table:     t_pay_order
     * Column:    Status
     * Nullable:  false
     */
    private Byte status;

    /**
     * 原始订单编号，同步回调使用
     *
     * Table:     t_pay_order
     * Column:    OriginalOrderId
     * Nullable:  true
     */
    private String originalorderid;

    /**
     * 客户端IP
     *
     * Table:     t_pay_order
     * Column:    ClientIp
     * Nullable:  true
     */
    private String clientip;

    /**
     * 设备
     *
     * Table:     t_pay_order
     * Column:    Device
     * Nullable:  true
     */
    private String device;

    /**
     * 商品标题
     *
     * Table:     t_pay_order
     * Column:    Subject
     * Nullable:  false
     */
    private String subject;

    /**
     * 商品描述信息
     *
     * Table:     t_pay_order
     * Column:    Body
     * Nullable:  false
     */
    private String body;

    /**
     * 特定渠道发起时额外参数
     *
     * Table:     t_pay_order
     * Column:    Extra
     * Nullable:  true
     */
    private String extra;

    /**
     * 渠道商户ID
     *
     * Table:     t_pay_order
     * Column:    ChannelMchId
     * Nullable:  false
     */
    private String channelmchid;

    /**
     * 渠道订单号
     *
     * Table:     t_pay_order
     * Column:    ChannelOrderNo
     * Nullable:  true
     */
    private String channelorderno;

    /**
     * 渠道支付错误码
     *
     * Table:     t_pay_order
     * Column:    ErrCode
     * Nullable:  true
     */
    private String errcode;

    /**
     * 渠道支付错误描述
     *
     * Table:     t_pay_order
     * Column:    ErrMsg
     * Nullable:  true
     */
    private String errmsg;

    /**
     * 扩展参数1
     *
     * Table:     t_pay_order
     * Column:    Param1
     * Nullable:  true
     */
    private String param1;

    /**
     * 扩展参数2
     *
     * Table:     t_pay_order
     * Column:    Param2
     * Nullable:  true
     */
    private String param2;

    /**
     * 异步通知地址
     *
     * Table:     t_pay_order
     * Column:    NotifyUrl
     * Nullable:  false
     */
    private String notifyurl;

    /**
     * 通知次数
     *
     * Table:     t_pay_order
     * Column:    NotifyCount
     * Nullable:  false
     */
    private Byte notifycount;

    /**
     * 同步通知地址
     *
     * Table:     t_pay_order
     * Column:    ReturnUrl
     * Nullable:  true
     */
    private String returnurl;

    /**
     * 最后一次通知时间
     *
     * Table:     t_pay_order
     * Column:    LastNotifyTime
     * Nullable:  true
     */
    private Long lastnotifytime;

    /**
     * 订单失效时间
     *
     * Table:     t_pay_order
     * Column:    ExpireTime
     * Nullable:  true
     */
    private Long expiretime;

    /**
     * 订单支付成功时间
     *
     * Table:     t_pay_order
     * Column:    PaySuccTime
     * Nullable:  true
     */
    private Long paysucctime;

    /**
     * 创建时间
     *
     * Table:     t_pay_order
     * Column:    CreateTime
     * Nullable:  false
     */
    private Date createtime;

    /**
     * 更新时间
     *
     * Table:     t_pay_order
     * Column:    UpdateTime
     * Nullable:  false
     */
    private Date updatetime;
    /**
     * 更新时间
     *
     * Table:     t_pay_order
     * Column:    IsNeedInvoice
     * Nullable:  true
     */
    private Byte isneedinvoice;
    /**
     * 更新时间
     *
     * Table:     t_pay_order
     * Column:    IsCancel
     * Nullable:  true
     */
    private Byte iscancel;
    private static final long serialVersionUID = 1L;
}
